#ifndef _SPY_STR_HPP_
#define _SPY_STR_HPP_

namespace smallpy {
  namespace datastructures {
    template <typename T>
    class DynamicList {
    private:
      T *buf;
      int len, capacity;
      void grow();
    public:
      DynamicList();
      DynamicList(T *, int);
      DynamicList(const DynamicList &);
      ~DynamicList();
      DynamicList &operator=(const DynamicList &);
      DynamicList operator+(const DynamicList &) const;
      DynamicList operator+=(const DynamicList &);
      DynamicList operator*(int);
      void append(T);
      void insert(int, T);
      void remove(int);
      void extend(const DynamicList &);
      T &operator[](int);
    };
    using String = DynamicList<char>;
  }
}

#endif